<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/6/28
 * Time: 15:53
 */
$studentId=$_GET['studentId'];
$dsn = "sqlsrv:Server=localhost;Database=Student";
$db = new PDO($dsn, "sa", "123456");
$sql="delete from Student where StudentId='{$studentId}'";
$result = $db->exec($sql);
if ($result){
    echo "删除成功,前往<a href='studentList.php'>列表页</a>";
}else{
    echo "删除失败,前往<a href='studentList.php'>列表页</a>";
}